<template>
<div>

    <jia :count="count" @func="add" ></jia>

    <hr>
    
    <jian :count="count" @func='sub'></jian>



</div>
</template>





<script>

  import jia from "./components/add.vue";
  import jian from "./components/sub.vue";

export default {
    data(){
      return{
        count:0

      }
    },
    methods:{
        add(){
          this.count++
        },
        sub(){
          this.count--
        }

    },
    components:{
      jia,
     jian
    }




}
</script>

<style>

</style>